package com.example.deepseek.backend.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

public class DeepSeekRequest {

    @JsonProperty("model")
    private String model; // 模型名称

    @JsonProperty("messages")
    private List<Message> messages; // 消息列表

    @JsonProperty("temperature")
    private double temperature = 0.7; // 生成文本的随机性

    @JsonProperty("max_tokens")
    private int maxTokens = 2048; // 最大生成token数

    // Getter and Setter methods
    public String getModel() {
        return model;
    }
    
    public void setModel(String model) {
        this.model = model;
    }
    
    public List<Message> getMessages() {
        return messages;
    }
    
    public void setMessages(List<Message> messages) {
        this.messages = messages;
    }
    
    public double getTemperature() {
        return temperature;
    }
    
    public void setTemperature(double temperature) {
        this.temperature = temperature;
    }
    
    public int getMaxTokens() {
        return maxTokens;
    }
    
    public void setMaxTokens(int maxTokens) {
        this.maxTokens = maxTokens;
    }
    
    // 消息内部类
    public static class Message {
        @JsonProperty("role")
        private String role; // 角色：user 或 assistant

        @JsonProperty("content")
        private String content; // 消息内容

        public Message(String role, String content) {
            this.role = role;
            this.content = content;
        }
        
        // Getter and Setter methods
        public String getRole() {
            return role;
        }
        
        public void setRole(String role) {
            this.role = role;
        }
        
        public String getContent() {
            return content;
        }
        
        public void setContent(String content) {
            this.content = content;
        }
    }
}